<%@ page language="java" contentType="text/html; charset=utf-8" import="com.bjsxt.shopping.user.*,com.bjsxt.shopping.product.*"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%
request.setCharacterEncoding("utf-8");
String action = request.getParameter("action");


if(action != null) {
	if(action.trim().equals("save") || action.trim().equals("modify")){
	int id = Integer.parseInt(request
			.getParameter("id"));
	String translatedText = request
			.getParameter("translatedText");
	User u = (User)session.getAttribute("user");
	String translatorid = u.getLoginname();
	System.out.println(id+"///////"+translatorid);
	Product p1 = new Product();
	p1.setId(id);
	p1.setTranslatedText(translatedText);
	p1.setTranslatorid(translatorid);
	if(action.trim().equals("save")) {
		System.out.println("进入保存");
		p1.setSend_status("译文暂存");
		
	}else{
		System.out.println("进入提交");
		p1.setSend_status("待审核");
	}
	ProductMgr.getInstance().submitTrans(p1);
	response.sendRedirect("VSendSuccessful.jsp");
	%>
	<script language="javascript">
		parent.main.location.reload();	
	</script>
	<%
	return;
	}
}else{

	int id = Integer.parseInt(request
			.getParameter("id"));
	Product p = new Product();
	 p = ProductMgr.getInstance().loadWebById(id);
}

%>


<%
	int id = Integer.parseInt(request
			.getParameter("id"));
	Product p = new Product();
	 p = ProductMgr.getInstance().loadWebById(id);
%>

<html>
	<head>

		<meta http-equiv="Content-Language" content="zh-cn">
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<title>- 翻译详细信息</title>

		<link href="images/new.css" rel="stylesheet" type="text/css">
		<script language="javascript1.2">
function js_callpage(htmlurl)
{
	var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,top=2,width=360,height=470');
	return false;
}
function js_callpage1(htmlurl)
{
	var newwin=window.open(htmlurl,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=2,width=100,height=100');
	return false;
}
function checkSave()
{
	register.action.value="save";
}
</script>




	</head>
	<body>
	
		<table align="center" border="0" cellpadding="0" cellspacing="0"
			width="980">
			<tbody>


				<tr>
					<td bgcolor="#dadce8" height="1">
						<img src="images/line.gif" height="1" width="1">
					</td>
				</tr>

				<tr>
					<td>
						<table border="1" cellpadding="0" cellspacing="0" width="100%">
							<tbody>
								<tr>
									<td bgcolor="#e5e5f0" valign="top" width="190">
										<img src="images/gg11.jpg" height="60" width="180">
									</td>
									<td width="10">
									</td>
									<td valign="top" width="780">
										<table style="border-collapse: collapse;" border="0"
											bordercolor="#111111" cellpadding="0" cellspacing="0"
											height="417" width="100%">
											<tbody>


												<tr>
													<td height="119">
														<table style="border-collapse: collapse;" border="0"
															bordercolor="#111111" cellpadding="0" cellspacing="0"
															width="100%">
															<tbody>
																<tr>
																	<td width="100%">
																		<input name="nowpcd" value="" type="hidden">
																		<table border="0" cellpadding="0" cellspacing="0"
																			width="100%">

																		
																			<tbody>



																				<tr>
																					<td bgcolor="#e5e5f0" height="25">
																						<table style="border-collapse: collapse;"
																							border="0" cellpadding="0" cellspacing="0"
																							width="100%">
																							<tbody>
																								<tr>
																									<td>
																										&nbsp;
																										<img src="images/m_33.gif" height="10"
																											width="10">
																										&nbsp;
																										<strong>文章详细信息
																										</strong> 
																										
																									</td>
																									<td align="right">
																									
																											<input name="reg111" value="返&nbsp;回" type="submit" style="width:50px;height:25px;font-size:13px;" onclick="location.href='javascript:history.back();'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
																									</td>

																								</tr>


																							</tbody>
																						</table>
																					</td>

																				</tr>


																				<tr>
																					<td align="center" height="100">
																					<form method="post" name="register" action="ShowTranslateDetail.jsp" onSubmit="this.regsubmit.disabled=true;">
																						<input type="hidden" name="action" value="modify"/>
																						<input type="hidden" name="id" value="<%=id%>"/>
																						<table style="border-collapse: collapse;"
																							bgcolor="#ffffff" border="1" cellpadding="0"
																							cellspacing="0" width="95%">
																							<tbody style="height: 30px">
																								<tr>
																									<td rowspan="4" width="108">
																										
																									</td>
																									<td width="492">
																										<a class="mingcheng1"><%=p.getSubject()%>&nbsp;</a>
																									</td>
																									<td width="50">
																										
																									</td>																									
																									

																								</tr>
																								<tr>
																									<td width="400">
																										发布时间：<%=p.getSave_time()%>
																										&nbsp;<br>
																										&nbsp;<br>
																										
																										字数：
																										<font color="#cc0000">203</font>&nbsp;
																											&nbsp;<br>
																									</td>
																									<td align="right" >
																										
																									</td>
																																																				
																								</tr>
																								
																								<tr>
																									<td colspan="1" width="633" height="333">
																										正文： <br> <br> 
																										&nbsp;&nbsp; <%=p.getContent()%>
																									</td>
																									<td colspan="1" width="633">
																										译文： <br> <br> 
																										&nbsp;&nbsp; 
																										<%=p.getTranslatedText()%>
																									</td>
																								</tr>
																								
																								<tr>
																								<td></td>
																								
																																																		
																										
																								</tr>
																								
																								
																							</tbody>
																						</table>
																						</form>
																					</td>
																				</tr>
																				<tr>
																					<td align="center" height="20" valign="middle">
																						<img src="images/3j_line_2.gif" height="3"
																							width="744">
																					</td>
																				</tr>


																			</tbody>
																		</table>
																	</td>
																</tr>

															</tbody>
														</table>
													</td>
												</tr>
												<tr>
													<td height="30">
													</td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				<tr>
					<td width="100%">
						<!--底部INC--><br>
					</td>
				</tr>
			</tbody>
		</table>
	</body>
</html>
